<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableRecipesComments extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('recipes_comments', function($table)
		{
			$table->increments('id');
			$table->string( 'comment', 255 );
			$table->integer( 'user_id' );
			$table->integer( 'recipe_id' );
			$table->integer( 'parent_comment' )->nullable(true);
			$table->timestamps();
			$table->softDeletes();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('recipes_comments');
	}

}
